﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;

namespace Genuilder.Extensibility.Tests
{
	public class TestDirectory : IDisposable
	{
		static Random _Rand = new Random();
		public TestDirectory()
		{
			_Name = _Rand.Next().ToString();
			Directory.CreateDirectory(_Name);
		}

		private readonly string _Name;
		public string Name
		{
			get
			{
				return _Name;
			}
		}
		#region IDisposable Members

		public void Dispose()
		{
			Directory.Delete(_Name, true);
		}

		#endregion
	}
}
